import { get, post } from './request'
export function getSongListPage(params) {
  console.log('getSongListPage', params)
  return get('/song-list/page',params)
}

export function getAllSongList() {
    return get('/song-list/list')
}

// 获取详情
export function getSongListDetail() {
  return get('/song-list/all')
}

export function addSongList(data){
  return post('/song-list/add',data)
}

export function deleteSongList(id) {
  return get(`/song-list/delete/${id}`)
}

// 获取特定 id 的歌单详情
export function getSongListById(id) {
  return get(`/song-list/detail/${id}`);
}

export function getSongListSongs(songListId) {
  return get(`/song-list/songs/detail/${songListId}`)
}


// 删除歌单中的歌曲
export function deleteSongFromList(listId, songId) {
   return get(`/song-list/songs/delete?songListId=${listId}&songId=${songId}`);
}

// 添加歌曲到歌单
export function addSongToList(listId, songId) {
    return get(`song-list/add/${listId}/song`, { params: { songId } });
}


// 获取所有歌曲
export function getAllSongs() {
   return get('song-list/songs/all'); 
}

